package com.demo2.component;

import com.demo2.model.Student;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
public class StudentComponent {

    @Bean
    public Student student1() {
        Student stu = new Student();
        stu.setId(1);
        stu.setName("林俊杰");
        return stu;
    }

}
